//
//  MSNetworkManager.h
//  ZuLinProject
//
//  Created by ypj on 2021/12/14.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

typedef void (^NetworkSuccess)(id paginationObj , id resonseObj , BOOL isSuccess,  NSString *message);
typedef void (^NetworkFail)(NSUInteger code ,NSString *message);

@interface MSNetworkManager : NSObject

/**检测网络*/
+(void)showNoNetAlert;
/**登录失效*/
+ (void)showLoginAlert;

/**
 GET 请求
 */
+ (void)getRevertUrl:(NSString *)url
              params:(NSDictionary *)body
             success:(NetworkSuccess)success
             failure:(NetworkFail)failure
             withShowHud:(BOOL)isShow;
/**
 POST 请求
 */
+ (void)postRevertUrl:(NSString *)url
               params:(NSDictionary *)body
              success:(NetworkSuccess)success
              failure:(NetworkFail)failure
              withShowHud:(BOOL)isShow;

/**
 * POST 文件流上传
 * arrray 存放的数据
 */
+ (void)postRevertUrl:(NSString *)url
            params:(NSDictionary *)body
             formData:(NSArray *)arrray
              success:(NetworkSuccess)success
              failure:(NetworkFail)failure
              withShowHud:(BOOL)isShow;

/**
 * 上传文件/单张
 */
+ (void)postFilesUrl:(NSString *)url
            params:(NSDictionary *)body
             formData:(YLUploadMedia *)media
              success:(NetworkSuccess)success
              failure:(NetworkFail)failure
         withShowHud:(BOOL)isShow;

@end

NS_ASSUME_NONNULL_END
